package com.inmobi.re.container;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.Path.FillType;
import android.graphics.RectF;
import android.view.View;

public class CustomView extends View
{
  private float a;
  private float b;
  private float c;
  private float d;
  private float e;
  private SwitchIconType f;
  private int g;
  private Paint h;
  private Path i;
  private RectF j;

  private CustomView(Context paramContext)
  {
    super(paramContext);
  }

  public CustomView(Context paramContext, float paramFloat, SwitchIconType paramSwitchIconType)
  {
    this(paramContext);
    this.f = paramSwitchIconType;
    this.a = paramFloat;
    this.g = 15;
    this.b = (50.0F * this.a / 2.0F);
    this.c = (30.0F * this.a / 2.0F);
    this.d = (this.b - this.c / 3.0F);
    this.e = (this.b + this.c / 3.0F);
    this.h = new Paint(1);
    this.j = new RectF();
    this.i = new Path();
  }

  protected void onDraw(Canvas paramCanvas)
  {
    super.onDraw(paramCanvas);
    this.h.reset();
    switch (a.a[this.f.ordinal()])
    {
    default:
      return;
    case 1:
      this.h.setAntiAlias(true);
      this.h.setColor(-16777216);
      this.h.setStrokeWidth(3.0F);
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawCircle(this.b, this.b, this.c, this.h);
      this.h.setColor(-1);
      this.h.setStyle(Paint.Style.STROKE);
      paramCanvas.drawLine(this.d, this.d, this.e, this.e, this.h);
      paramCanvas.drawLine(this.d, this.e, this.e, this.d, this.h);
      paramCanvas.drawCircle(this.b, this.b, this.c, this.h);
      return;
    case 2:
      this.h.setAntiAlias(true);
      this.h.setColor(0);
      this.h.setStrokeWidth(3.0F);
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawCircle(this.b, this.b, this.b, this.h);
      return;
    case 3:
      this.i.reset();
      this.i.setFillType(Path.FillType.EVEN_ODD);
      this.i.moveTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2);
      this.i.lineTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F);
      this.i.close();
      this.h.setAntiAlias(true);
      this.h.setColor(-16777216);
      this.h.setStrokeWidth(3.0F);
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawPath(this.i, this.h);
      return;
    case 4:
      this.i.reset();
      this.i.setFillType(Path.FillType.EVEN_ODD);
      this.i.moveTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2);
      this.i.lineTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F);
      this.i.close();
      this.h.setAntiAlias(true);
      this.h.setColor(-12303292);
      this.h.setStrokeWidth(3.0F);
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawPath(this.i, this.h);
      return;
    case 5:
      this.i.reset();
      this.i.setFillType(Path.FillType.EVEN_ODD);
      this.i.moveTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F);
      this.i.lineTo(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2);
      this.i.close();
      this.h.setAntiAlias(true);
      this.h.setColor(-16777216);
      this.h.setStrokeWidth(3.0F);
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawPath(this.i, this.h);
      return;
    case 6:
      this.i.reset();
      this.h.setAntiAlias(true);
      this.h.setColor(-16777216);
      this.h.setStrokeWidth(5.0F);
      this.h.setStyle(Paint.Style.STROKE);
      this.j.set(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F, getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F);
      paramCanvas.drawArc(this.j, 0.0F, 270.0F, false, this.h);
      this.i.setFillType(Path.FillType.EVEN_ODD);
      this.i.moveTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 - 2.0F * this.a);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F - 2.0F * this.a, getHeight() / 2);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F + 2.0F * this.a, getHeight() / 2);
      this.i.lineTo(getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 - 2.0F * this.a);
      this.i.close();
      this.h.setStyle(Paint.Style.FILL_AND_STROKE);
      paramCanvas.drawPath(this.i, this.h);
      return;
    case 7:
    }
    this.h.setAntiAlias(true);
    this.h.setColor(-16777216);
    this.h.setStrokeWidth(5.0F);
    this.h.setStyle(Paint.Style.STROKE);
    paramCanvas.drawLine(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F, getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F, this.h);
    paramCanvas.drawLine(getWidth() / 2 - this.g * this.a / 2.0F, getHeight() / 2 + this.g * this.a / 2.0F, getWidth() / 2 + this.g * this.a / 2.0F, getHeight() / 2 - this.g * this.a / 2.0F, this.h);
  }

  public void setSwitchInt(SwitchIconType paramSwitchIconType)
  {
    this.f = paramSwitchIconType;
  }

  public static enum SwitchIconType
  {
    static
    {
      CLOSE_ICON = new SwitchIconType("CLOSE_ICON", 2);
      REFRESH = new SwitchIconType("REFRESH", 3);
      BACK = new SwitchIconType("BACK", 4);
      FORWARD_ACTIVE = new SwitchIconType("FORWARD_ACTIVE", 5);
      FORWARD_INACTIVE = new SwitchIconType("FORWARD_INACTIVE", 6);
      SwitchIconType[] arrayOfSwitchIconType = new SwitchIconType[7];
      arrayOfSwitchIconType[0] = CLOSE_BUTTON;
      arrayOfSwitchIconType[1] = CLOSE_TRANSPARENT;
      arrayOfSwitchIconType[2] = CLOSE_ICON;
      arrayOfSwitchIconType[3] = REFRESH;
      arrayOfSwitchIconType[4] = BACK;
      arrayOfSwitchIconType[5] = FORWARD_ACTIVE;
      arrayOfSwitchIconType[6] = FORWARD_INACTIVE;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.inmobi.re.container.CustomView
 * JD-Core Version:    0.6.2
 */